# i[0]-1 为序号
# i[1]   为匹配变量

# i = 1
# for i in range(len(list_type)):
#     temp = list_type[i][1]
#     for j in range(i):
#         if list_type[j][1] == temp:
#             print(list_type[j][0])

# class HashTable:
#     def __init__(self, size):
#         self.elem = [None for i in range(size)]
#         self.count = size
#
#     def hash(self, key):
#         return key % self.count
#
#     def insert_hash(self, list_a):
#         key = list_a[]


if __name__ == '__main__':
    list_type = [
        [1, '1234561', '地址'],
        [2, '123456', '地址'],
        [3, '1234561', '地址'],
        [4, '123456', '地址']
    ]
    dict_0_1 = {}
    for i in list_type:
        id_1 = i[1]  # id_1为要匹配的字符串（'123456'）
        if id_1 not in dict_0_1:
            dict_0_1[id_1] = i[0]
        # 如果dict中存在字符串，即字符串重复，输出对应的value
        else:
            print(dict_0_1[id_1])
